using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace InputMouse
{
   
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        MouseState mouse;
        
        private Texture2D mouseIcone;
        private Vector2 posicaoXY;


        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

     
        protected override void Initialize()
        {
            posicaoXY = Vector2.Zero;

            base.Initialize();
        }

        protected override void LoadContent()
        {
            
            spriteBatch = new SpriteBatch(GraphicsDevice);

            mouseIcone = Content.Load<Texture2D>("seta");
        }

        
        protected override void UnloadContent()
        {
            
        }

       
        
        protected override void Update(GameTime gameTime)
        {

            mouse = Mouse.GetState();

            posicaoXY.X = mouse.X;
            posicaoXY.Y = mouse.Y;


            base.Update(gameTime);
        }

        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            spriteBatch.Begin();

            spriteBatch.Draw(mouseIcone, posicaoXY, Color.White);

            spriteBatch.End();

            base.Draw(gameTime);
        }
    }
}
